<template>
    <div class="bread">
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item v-for="r in route.matched" :key="r.path" :to="{ path: r.path }">{{ r.meta.title }}
            </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>
  
<script setup lang="ts">
import { useRoute } from "vue-router";
const route = useRoute();
console.log(route.matched);
</script>
  
<style scoped>
.bread {
    padding-bottom: 20px;
}
</style>